PART THREE - THE MISSION SPHERE FILES

As we have seen, the level file has (at least 3) lines that are prefaced with "MissionSphere". These lines give information about starting ships and the map's resources. The first MissionSphere line in our example level file contains information about our resources, including, most importantly, the name of the resource file: "ResourceSphere_1.missphere" This file contains every single resource element that we want to use in the map including asteroids, dust clouds and particles. 

This file is the 'ResourceSphere' and it holds all the resources, and any derelicts or ships. When ships are placed in the ResourceSphere they go under AI control, even when playing with no computer players. This is also where the Distribution (*.dist) files are linked to (i.e. the *.dist files are named in the ResourceSphere file. You need one Resource Sphere file at least, even if your map doesn't have resources, you can have more than one, but usually there is no point, unless your ResourceSphere_*.missphere file is bigger than 64K

The next two files in our example level are Mothership_*.missphere file, these contain all the player starting fleets and the starting location of those fleets. Again the most important aspect of these lines it the fact that these lines contain the names of the files containing the details for player one and player two; the files Mothership_0.missphere and Mothership_1.missphere consecutively.

These files are our 'Mothership' files. You need the Mothership mission sphere files in every directory, and you have to have one for each player on that map.

We will begin with these Mothership files:

The Mothership Mission Spheres

The "Mothership_0.missphere" contains the list of ships/fighters etc that the player starts with. 

-------------------------------------------------------------

Tutorial Map Part Ten

Once again let's use the example given in the Tutorial Map Files folder, go into it and copy both the Mothership_#.missphere files into your Revelations2 folder.

Open both these files, we will edit both simultaneously, it's easier that way. For the moment read on

-------------------------------------------------------------

Done that? Easy step wasn't it? Well lets take a gander at the 'Mothership_0.missphere' file. Take a look around it. Have a look at the first three lines, again it's those MissionMan generated lines, and they have to be there. Why? Nobody knows, just make sure they are there, the only thing you can change here is on the third line saying 'MissionSphere Object: R1,Mothership', you can change the 'R1' to 'R2' if you need to (i.e. when all the ships below are 'R2' ships you would change it, although its not drastic and wont crash your game if you neglect this).

There are three lines of ships in this file, lets take a closer look at them;

Ships     ,11633.0,-76504.0,36722.4,97.0,R1,Mothership,1,NULL_FORMATION|?|?,?,?
Ships     ,7259.3,-76708.0,36722.4,97.0,R1,ResourceCollector,1,PARADE_FORMATION|?|?,?,?
Ships     ,12875.4,-76018.5,36722.4,97.0,R1,ResearchShip,1,PARADE_FORMATION|?|?,?,?

"Ye Gods! Yet more numbers and stuff! What's all that after the 'ships<tab>' leader?" I hear you ask. Well, these too are simple once you know, let's go through them, they are;

Ships	,posx,posy,posz,rot,race,shiptype,numShips,formation|flag|,properties,propertiesParam,..

posx, posy, posz 
Once again, these are the x,y,z co-ordinates that designate the positions of the ship(s) on the map. These will always be the bit you fiddle about with most.

rot
This sets the rotation angle of ship - it's facing. 0 degrees is always along the positive x=0 axis of your map so if you have a ship way out on the x axis, say with co-ordinates 80000,0,0, to have it facing the centre you would have to turn it around at an angle of 180 degrees. Ergo, if it is way back along the negative x axis say -90000,0,0 then you would leave it at a facing of 0 degrees to have it facing the centre. Remember the angle is measured anticlockwise.

race 
This sets the race of the ship where;

? = No Race
R1 = Kushan 
R2 = Taiidan 
P1 = Turanic Raiders
P2 = Kadeshi Garden Protectors
P3 = T-Mat
Traders = Bentusi & assorted

This is defined by the 'ship type', if you had a Kadeshi missile corvette then its race would be P2, a defence field frigate would be a R2 race ship and so on. It does not have anything to do with the race as defined in the level file, only the ship type it is and the ship type is defined by the next value;

shiptype 
This sets what type of ship it is. The list of ships available have already been mentioned above and you can find the list again in Appendix I.

numShips 
This value sets the number of ship to place, theoretically there is no limit to the amount of ships you place.

formation 
Here the starting formation of these ship(s) is assigned, the default is NULL_FORMATION, but you can get some weird results using this for more than one ship, although if you place proximity sensors and there is more than one of them then I recommend using this formation. Your best bet is PARADE_FORMATION, which will place all the ships you want in the default parade formation your ships assume around your mothership after being built, this also reveals a shortcut that you need only define the x,y,z position for your mothership, and put all the rest in parade formation, no matter what position is listed for them.

The available formations are:

NULL_FORMATION
PARADE_FORMATION
DELTA_FORMATION
BROAD_FORMATION
DELTA3D_FORMATION
CLAW_FORMATION
WALL_FORMATION
SPHERE_FORMATION
PICKET_FORMATION

flag 
You can have any ship you want as the mothership. This value sets whether the ship is the players mothership with 'UseAsMothership' or '?' if its not. A word of warning though, if your designated mothership is not a proper 'Mothership' or a Carrier then your game will crash the second you or any opponent, including computer opponents, enters the build manager.

Properties and porpertiesParam: colour
The next three values, the '?,?,?' part at the end of the line concern properties of that ship(s). These are covered more fully in 'Gary's Notes', and so will be discussed more fully there. There is however one unique property concerning ships, namely the colour.

You can add a "colorScheme(n)" to explicitly control what colour scheme the ship will be.  Here are the default colour schemes for the ships as they stand now. 

Race				Default colour scheme
R1 (Kushan)				0
R2 (Taiidan)				1
P1 (Turanic Raiders)			4
P2 (Kadeshi Garden Protectors)		5
P3 (T-Mat)				6
Traders (Bentusi & assorted)		7

Don't forget that this all ties in with what you have set in the level file, (see 'Determining what colour schemes a ship can be' for a full explanation of how its done.)

So that's the ship lines. Pretty simple when you know how eh?

-------------------------------------------------------------

Tutorial Map Part Eleven

Ok lets take a look at our starting fleets. The basic start up kit; along with the Mothership we have a resource collector and a research ship. Let's add more. Now, the simplest way would be to copy the starting fleet we want from another Mothership_#.missphere file, but we are going to do this the hard way.

Copy the last line four times, leaving no blank line gaps. So we now have 7 lines of ships. We want to have a resource controller in there, as well as some scouts, three frigates and three ion frigates (as in Hyperspace Arena). First we will rename all our ships, using relic's ship type list in Appendix I, (and being ware of CaSe) Rename your newly copied ship lines to the ships you want. You want to change these last four lines, changing 'ResearchShip' to 'ResourceController', 'LightInterceptor', 'StandardFrigate' and 'IonCannonFrigate' respectively.

Ok change the numbers of each ship type, we want; 2 ResourceCollectors, 1 ResourceController, 4 ResearchShips, 5 LightInterceptors, 3 StandardFrigates, and 3 IonCannonFrigates.

We are happy with the rest of the lines for the moment, they are all in PARADE_FORMATION, so the position will not matter, the facing we will deal with shortly and the race is R1. Cool. Repeat this for the Mothership_2.missphere file, and change every 'R1' you can find to 'R2'.

Ok the position and facing. We want one player set up to the 'north' of the map (top of your drawn out map) and the second player to the 'south' (bottom of your drawing). Ok, we don't want the players to start too far apart, perhaps 100km will be enough (and we can always change this once we have seen our map). 

Because all ships begin in PARADE_FORMATION, the posx, posy and posz values, (the x,y,z co-ordinates) of all ships in these Mothership files will be the same. For Player One change them to; 0,50000,0. For player Two (the Mothership_1.missphere file) change all these co-ordinates to; 0,-50000,0. 

Lastly the facing (rot), remembering that x=0, we can see from our drawing that to have player 1 (at co-ord. 0,50000,0) facing the centre he must turn 270 degrees (or -90), for player 2 on the 'minus' y axis this turn will be 90. Just remember your trigonometry and you can't go wrong.

Ok then, now you're Mothership_0.missphere file (Player One) should look like this;

; MissionMan script, Friday, Sep 3 1999, 12:14:43 PM
; Copyright (c) 1998-99, Relic Entertainment Inc.
; MissionSphere Object: R1,Mothership

Ships     ,0.0,50000.0,0.0,-90.0,R1,Mothership,1,NULL_FORMATION|?|?,?,?
Ships     ,0.0,50000.0,0.0,-90.0,R1,ResourceController,1,PARADE_FORMATION|?|?,?,?
Ships     ,0.0,50000.0,0.0,-90.0,R1,ResourceCollector,2,PARADE_FORMATION|?|?,?,?
Ships     ,0.0,50000.0,0.0,-90.0,R1,LightInterceptor,5,PARADE_FORMATION|?|?,?,?
Ships     ,0.0,50000.0,0.0,-90.0,R1,ResearchShip,4,PARADE_FORMATION|?|?,?,?
Ships     ,0.0,50000.0,0.0,-90.0,R1,StandardFrigate,3,PARADE_FORMATION|?|?,?,?
Ships     ,0.0,50000.0,0.0,-90.0,R1,IonCannonFrigate,3,PARADE_FORMATION|?|?,?,?

Because we have all the extra ships in Parade formation, only the co-ordinates of the Mothership actually matters, all the remaining ships will arrange themselves into their default positions, as they do in the game when they are first built. For Player Two (the Mothership_1.missphere file) the only differences are the y co-ordinates (which is; -50000), the rate of turn or facing (which is; 90) and every 'R1' will be a 'R2'.

You could if you wish have the other ships, say the scouts for instance, in any of the viable formations and the co-ordinates will locate the central ship in that formation. Just be careful that your ships are not too close together.

-------------------------------------------------------------

 
The Resource Mission Spheres

Right, this is where everyone seems to get disillusioned with the whole thing. Resources are simple to deal with, absolutely easy-peasy as we will discover. All you need is an idea of SOHCAHTOA (or access to MS excel but more on this later). But, don't let that worry you. Lets take a look then at what information is to be found in the ResourceSphere file.

The "ResourceSphere_*.missphere" file contains every single resource element used in the map including asteroids, dust clouds and particles. Resources can be of the following resource types:

Resources   Asteroid
Resources   DustCloud
Resources   Nebula

Each line is an individual 'cluster' of asteroids. Each line can be regarded as separate, dealing with a single sphere or cylinder shape area on your map that is full of asteroids. The information contained in each line is cross-referenced with the '*.dist' file (the distribution file) named in that line.

It is VERY important that if you are placing resources that you insure that the distribution file contains the right kind of resources for the "Resource" type listed. Another important thing to remember is that the ResourceSphere names the distribution files that will be used by the game and thus is present in every folder of your map. There is a close relationship between ResourceSphere files and distribution files (closer than two really close things that are really close together). The distribution files contain all the ratio information about the asteroid type that the cluster is composed of. The types of asteroid as well as the location, total amount and area are all dealt with in the ResourceSphere file.

Having no resources in the map will work fine, although the ResourcesSphere file itself is still required, don't forget to leave the MissionMan comments section at the top, just delete all resources from an existing ResourcesSphere file and add that to your folder.

-------------------------------------------------------------

Tutorial Map Part Twelve

Open up the Tutorial Map folder and copy the file called 'ResourceSphere_1.missphere' into your 'Revelations2' folder. Check to make sure this file name is exactly as named in the Revelations2.level file, in this case it is, the level file says the resources are to be found in the file named 'ResourceSphere_1.missphere' and the file is indeed called 'ResourceSphere_1.missphere'. (Once again, the case should match EXACTLY).

Next we would normally want to delete all the resources that are in here, as we want to add or own. We would delete everything bar the first three lines (the MissionMan generated headers). However, don't do it just yet, I'm gonna show you a wee trick that I use. 

This ResourceSphere file is taken from the Relic made default map called 'Hyperspace Arena' I found this file using the Big Viewer, in the Homeworld/Multiplayer/Hyperspace2 folder to be precise. I think it was originally called 'ResourceSphere_3.missphere' but that's not important. Anyway, what I do is just copy this folder into my map folder and look at the names of the *.dist files that this file refers to. In this case there are four; AsteroidCentre.dist, DustCloudCentre.dist, AsteroidLong.dist and nebula.dist. We will cover these shortly, but for the moment just nod in agreement. "Yes Dylov." Right, these four distribution files have been named so they will be required, happily they have all been included in the Tutorial Map folder. So go there and copy all four files into your Revelations2 folder.

The point of adding in all 'Hyperspace Arenas' resources is so that you can see your map and get an idea of the scale. 'Hyperspace Arena' is a medium to large map, this is a handy thing to do if you, like me are into big maps. I have a habit of making huge maps that are way too big, this gives me some idea of a descent sized map so I don't start with players absolutely miles away from each other. Now, tremble in excitement as we prepare to take a first look at your map!

-------------------------------------------------------------

Tutorial Map Part Thirteen - A first look at your Map, and its first Tweaks.

Now, copy your Revelations2 folder into the homeworld/multiplayer folder (if its not already there). Your Revelations2 folder should contain the following files;

Description.txt
Downslope.btg
Downslope.hsf
Mothership_0.missphere
Mothership_1.missphere
ResourceSphere_1.missphere
Revelations2.level
AsteroidCentre.dist
DustCloudCentre.dist
AsteroidLong.dist
nebula.dist

Make sure that they do, then away you go and start up homeworld. In the multiplayer mission select file your mission is listed as; 'Revelations (2-6)'. Take note of the description box when you select your map, make sure all is well. You only have the map set up for two players at the moment so start up a 2-player game on your map. In the game, look around, pay attention that the background matches the light source (A minor if important point. My original version of 'Lughnassad' had the lighting all mixed up and I only noticed after I had spent ages placing all the resources and stuff. I had to virtually rewrite the whole damned thing after that. Man, I was royally miffed). Are you happy with the music? Are the two players facing the right direction and are all the ships placed okay? (fire off a probe at the CPU mothership to check this, or, record the game then check the recording for his disposition).

When you are finished quit out of the game, back to the main menu and press Alt-Tab to jump back to desktop, you will want to keep homeworld running from now on. I find on my CPU the transition between homeworld and windows to be much faster when I use the in game options to turn off the graphics card and select '(SW) Software' as the rendering system. But this may just be my CPU

Did it work? It should have, be sure to go through each stage of the tutorial checking you done everything right added everything I told you to, and remember; case and format. Case and format and Spelling.

Okay, lets tweak a little bit. We'll fool around with your description box and the light source. 

The Description box looks a little bunched up lets space out those lines of text a little. This is easily accomplished here by adding in two more lines beginning with 'Description<tab>' in the description.txt file. Add these lines in the relevant places so your first few lines will look like this;

Description	Revelations (2-6 Players)
Description	
Description	Hooray me! My First Map! Am I not just the dogs bollocks?
Description	
Description	Settings: Crates off.
Description	AUTHOR	 : Dylov (dy.lov@techemail.com)
Description	VERSION	 : 1.0 (April 19 2000)

Save that file. You'll have noticed that /downslope\ has set his light source as almost directly above and slightly more to the rear of your Mothership starting position, so lets move the map about a little to match up the star with the light source.

In the level file change the map line a little, we wont rotate it up/down (as /downslope\'s background is completely unforgiving for even a minor changes) we will rotate it left/right (rotz) by a small amount though, say; 20. (Remember that x=0 when we rotate the map, we are rotating it 'clockwise', by 20).

The line should now look like this;

Background	Downslope, 20, 0

Looks much better huh? Okay have a last look at the settings for the map, check that only crates are switched off, are you happy with the starting RU's and the bounty level? Sweeeet

-------------------------------------------------------------

Ok then, lets continue and start dealing with the resource clusters. We will start by taking a look at what is actually going on in the resource lines.

The Resources Line

A typical resource line looks like this;

Resources    Asteroid,11498.0,-75590.6,37846.9,Sphere,AsteroidCentre.dist,20,10038.4,20076.8,0.0,0.0,2048,?
Resources    DustCloud,29272.0,57643.9,-60609.0,Sphere,DustCloudCentre.dist,28,5000.0,10000.0,0.0,0.0,2048,0

Once again this seemingly intelligible mass of numbers is simple, they are;

resourcetype,posx,posy,posz,layout,distribution,numResources,radius,length,roty,rotz,properties..

resourcetype
This tells the game what type of resource it is dealing with here. You have a choice of three resource types and these must tie in with the distribution file you name in the line (see 'distribution' below). The types you can use are Asteroid, DustCloud, or, Nebula (There is a fourth; 'GasCloud' although if you use these, which are not supported by the game, then Homeworld will crash).

posx, posy, posz
The co-ordinates that designate the absolute centre of your cluster.

layout
The 3D layout of your resource cluster, can be either Sphere, Cylinder or Rectangle, alternately this line also earmarks Nebulas, which are spheres themselves, but they have their own wee section below.(see 'Nebulas' below). While Spheres and Cylinders are 3D shapes, Rectangles are 2D. Very flat. Very, very flat as it happens.

distribution
This is where you name the distribution file that the game goes to look for ratio details on the contents of your cluster. (see below on the section concerning distribution files)

numResources
The number of resources, this is giving the total amount of asteroids in your clusters. If you set this at 6 then you will have a total of 6 asteroids in the ratio as defined by the distribution file (but more on that later)

radius
The radius of the cylinder or sphere, or the length of a Rectangles.

length
The length of a cylinder, if you have tagged the resource cluster as being a cylinder. Or the Width of a Rectangle if you have tagged that line so. If a sphere has been tagged then it is not required although using this field to give the diameter of the sphere is cool. You can't leave it out altogether (retaining format), you have to have a number in here even though it may not be used.

roty, rotz
The angles of rotation (again, not relevant for spheres). The rotation about the y axis (up/down) and the rotation about the z axis (left/right). Cylinders or rectangles co-ordinates are located at the centre of that cylinder or rectangle. It's with this very thing that causes most headaches. Look for instance at Genesis 240D or Jupiter's rings. Every ring is made up of straight lines. Much more on this later.

properties
<Check with Gary> hahahahahahahahahah...wheee I'm sorry, I couldn't resist. We'll have a closer look at resource properties later for the moment we will move on to derelicts;
 
 
 Derelicts

Derelicts are all added alongside the resources in the ResourceSphere file. Derelicts also include the planets that you will often see on various maps. They follow virtually the same rules as resources, let's take a look at a derelict line;

Derelict     Homeworld,0,3000000,0,0,-90,0,?,?

Really, this is just a simplified version of the resource or ship lines. The values here are;

Derelict     derelicttype,posx,posy,posz,roty,rotz,properties..

derelicttype
This tells the game what type of derelict it is dealing with here, be it a station, a piece of junk or a planet. You have a choice of many derelict types and these must tie in with what you have included in the level file (using the IncludeDerelict command). The types you can use are listed in the relic objects file (see Appendix I).

posx, posy, posz
The co-ordinates of your derelicts.

roty, rotz
The angles of rotation about the y axis (up/down) and the rotation about the z axis (left/right or facing). 

properties
<Check with Gary>


Ships

Any ships added in this file will always be under computer control, even when there are 8 players rampaging about the map. Ships have already been covered, they are used in exactly the same way as you would with a MissionSphere file. The following line is a rotating Mining Base as copied directly from the somewhat astoundingly fantastic map; 'Lughnassad'.

Ships     ,42695.5,3622.8,11440.4,0,Traders,MiningBase,1,NULL_FORMATION|?|?,8,?,1,

A wee point to note, here you can see the Mining Base is rotating about the z axis, which has been flagged as up/down but it seemed to work fine for me here, perhaps it's the design of the Mining Base? If you are wondering just what the hell I am wittering on about, don't worry all will become clear when we take a look at Gary's notes;


Nebulas

Nebulae aren't as flexible when controlling the distribution as other resource types because of the extreme amount of randomness that goes into their construction. A vast cylindrical region thinly populated with nebulosity tendrils appears mostly identical to a vast rectangular region populated similarly, and I found that too many constraints produce unappealing tendril bunching. Nebulae tend to form in a cylindrical / spherical fashion even given the 'box' distribution (xSize,ySize,zSize). 

Nebulae use the same number of parameters as other resources, but again, with different intent. Lets take a look at the nebula from 'Hyperspace Arena';

Resources    Nebula,-11851.0,12876.0,0.0,Nebula,nebula.dist,150,39610.0,39610.0,39610.0,10000,0,?

Once again very simply to decipher once you know how. Here's how;

ResourcesNebula,posx,posy,posz,Nebula,distribution,numTendrils,xSize,ySize,zSize,numChunks

posx,posy,posz
The co-ordinates for its position. The co-ordinates designate the exact centre of the nebula.
Nebula
The 'layout' (normally cylinder, sphere, &c). Nebulae can only be of distribution 'Nebula'
distribution
This is where you name the distribution file that the game goes to look for ratio details on the contents of your nebula. (The *.dist file, see below on the section concerning distribution files)
NumTendrils
The number of "tendrils" in the nebula
xSize, ySize, zSize
Extent of the region that the nebula appears within, defines an axis-aligned box.
NumChunks
Seed value. Best to leave at >= 60 * numTendrils, <= 100 * numTendrils


ResourceSphere and MissionSphere Properties (or the infamous 'Gary's Notes')

The last three values in the resource, derelict and ship lines, more usually written as; '?,?,?' (and sometimes only two '?s' are used in resources, it really matters not) covers any special properties governing that resource cluster/derelict/ship and the last two '?s' are that properties parameters. 

The most common used is the 'regrowth' property for clusters of asteroids that regrow after they have been harvested and the shell property where a line concerning a sphere of asteroids will be a shell rather than a solid sphere. Gary's list of known properties is as follows; 

ATTRIBUTES_SalvageCorvetteattachtime	1
ATTRIBUTES_ShellOfResources 		2 
ATTRIBUTES_VelToMothership 		4 
ATTRIBUTES_DontApplyFriction 		8 
ATTRIBUTES_KillerCollDamage 		16 
ATTRIBUTES_Anomaly 			32 
ATTRIBUTES_NeutralShip			256
ATTRIBUTES_HeadShotVelToMothership 	512 
ATTRIBUTES_HeadShotKillerCollDamage 	1024 
ATTRIBUTES_Regrow 			2048 

ATTRIBUTES_SMColorInvisible 		4096 
ATTRIBUTES_SMColorYellow 		8192 
ATTRIBUTES_SMColorGreen 		12288 

Here are some examples: 

1	Attempts to salvage the object result in the Salvage Corvette attaching, waiting for a short period of time (set by it's value), and then returning to the mothership without the object.
2 Shell of resources. This only works for the spherical distribution. This flag indicates instead of a sphere, it should be a shell. 
8	Don't Apply Friction. This allows any ships, derelicts or asteroids placed on the map to rotate, this is covered more fully below
256	Neutral ship.  It shows up yellow on the mini map, won't attack you, and can't be salvaged.
2048 Regrowing asteroids. Set propertiesParam to indicate regrowth rate from min 0 to max 7, e.g. 7 this is perhaps the most useful attribute, and allows you to create resource pockets that regrow. 
 
A note on Rotating Derelicts:
Set properties to 8
If you want y-axis rotation set the first propertiesParam to 1  (Example:  8,1,?)
If you want z-axis rotation set the second propertiesParam to 1 (Example:  8,?,1)
Set both to one for rotation along both y and z                 (Example:  8,1,1)

There has not been much done with these at time of writing, it has been suggested that upping the propertiesParam from 1 to a higher number may result in faster spin. 

A note on MissionMan and properties:
Note that properties and propertiesParam can be set from within MissionMan and that some of these properties were designed for the single player game, and may not work in multiplayer.

Using MM: below "distribution" you should see "numResources". Double-click it. This tells it roughly how many RU's the resource cluster should generate.

A note on properties of '64' and '128':
At time of writing I have absolutely no idea what they do or where you would use them, if you find out yourself ever, be sure to let the relicboard (and myself) know.
 

A few points for troubleshooting The Mission Sphere Files;

The Mission Sphere Files have the distinction of winning the 'Files most likely to crash your Game Awards For 1999' and it looks like its in for a good shout in the 2000 Awards. It is an evil file that will crash your game at the slightest opportunity. Have talked about my problems with a comma and a full stop yet?

 Pay attention for spelling errors, particularly: resource types, distribution file names and         resource shape (layout) types. 

 Be very aware of the format lines is set in, be careful you don't accidentally exclude fields or add more when copying and pasting into lines.

 Check that there are no derelicts or ships specified which are also excluded in the level file. 

 Check that the correct distribution files associated with each resource type. 

 'GasClouds' are not supported and will crash HW, don't use them.

 If the file larger than 64KB in size, it must be cut into two files (for WON downloading).


 -------------------------------------------------------------

Tutorial Map Part Fourteen
 
 So now we know exactly what is going on in the ResourceSphere, we know that not only the resource clusters are here, but also if we want AI controlled ships and other derelicts or scenery then they all go in here too. 
 
 In your Revelations2 folder delete all the *.dist files. Now, go into the Tutorial Map Folder, you will find three more distribution files called 'Asteroid.dist', 'DustCloud.dist' and, 'Tiny.dist' copy these into your Revelations2 folder. Don't worry about the distribution files at the moment, they are simple text files that have the data pertaining to the range of sizes of each resource type, and should we need it; the regeneration rates of these resource types.
 
 Open up the Now, we will ignore the 3 line header beginning with the semi-colon and deal with the rest. We only need the first line beginning with Resources<tab>. I want you to delete every other line beginning with Resources<tab>, so we are left with just the one. 
 
 The only reason we have kept this as it makes a handy template to build our resources from.
 
 Okay our first line should look something like this;
 
 Resources  Asteroid,11498.0,-75590.6,37846.9,Sphere,AsteroidCentre.dist,20,10038.4,20076.8,0.0,0.0,2048,?
 
 First we will to change the location of this cluster. We want this sphere to be one of the spheres that surround the player Mothership. The easiest way to do that is to open up the Mothership_0.missphere file (Player One) in your Revelations2 folder and copy the x,y,z co-ord. (posx,posy,poz) and replace the posx,posy and posz values in your resource line with these. So that's the cluster centred about the players MS, 
 
 We are happy that it's a sphere so leave that. 
 
 Next we want to point this resource line at the 'Asteroid.dist' file, so delete 'AsteroidCentre.dist' and replace it with 'Asteroid.dist'.  
 
 Leave the resourceNum at 20 it's a nice big amount to start us off and allow for initial building in the relative safety of the immediate vicinity of the Mothership.
 
 Lets leave the next two values be, the radius and diameter is fine here, we know this because this is the resource cluster that we start in when we play 'Hyperspace Arena' and if it ain't broke
 
 Angle and rotation are fine, for a sphere it does not matter in the slightest, ignore them.
 
 The property is already set at Regeneration (2048), this is cool as we want the to regenerate to encourage the players to stay put and not all charge into the centre as is too often the case. The propertiesParam has been left at the default of '?', this seems to manifest as roughly the propertiesParam value of 7. Lets speed it up a little, lets hike it all the way up! Change the propertiesParam to '1'.
 
 And that's it. Your lines should look like this;
 
 Resources    Asteroid,0.0,50000.0,0.0,Sphere,Asteroid.dist,20,10038.4,20076.8,0.0,0.0,2048,1
 Resources    Asteroid,0.0,-50000.0,0.0,Sphere,Asteroid.dist,20,10038.4,20076.8,0.0,0.0,2048,1
 
 Start up homeworld and take a look at everything so far then Alt-Tab back to desktop. Lets go on to discuss the distribution files in a bit more depth.
 
-------------------------------------------------------------


Distribution of Resources; the *.dist files

Distribution files are simple text files that hold the information on the size and amounts of each size of the resource you have in a cluster. Lets take a look at a distribution file, open up Asteroid.dist which can be found in the Tutorial Map Folder, or if you are following the tutorial you will have copied it into your Revelations2 folder;

; Relative frequencies of asteroid types

Asteroid0		0	1
Asteroid1		1	2
Asteroid2		2	2
Asteroid3		2	1
Asteroid4		1	0

These files contain three values that are;

ResourceTypeSize,RelativeNumber,RegenNumber
ResourceTypeSize
This is the Asteroid Size scale (in this case the Resource Type is Asteroids, there are 5 different sizes listed here, this works exactly the same way with DustClouds - 'DustCloud0' to 'DustCloud4'and Nebulae - Nebula0 to Nebula4). Size '0' is the non-harvestable dust motes, '1' are slightly larger rocks and so on until '4' which are the size of a Destroyer or larger  (See Appendix I for the listing of all available resource types.
RelativeNumber
This gives us the relative number of times each asteroid type will occur. In our example, this means that for roughly every three 'Asteroid4's', there will be two 'Asteroid3's', etc
RegenNumber
This deals with regeneration properties and is not necessary for clusters you don't have set to regenerate. (property 2048, with propertiesParam being the regeneration rate.). If the cluster has not been set to regenerate then this number is completely unnecessary and can be omitted. 'RegenNumber' describes the distribution that the resource pocket will take after regenerating. This lets you have really valuable pockets that become less valuable after they've been completely mined (or alternately, pockets that grow MORE valuable...).

So let's have a wee shufty at our Asteroid.dist file. We can see at a glance the overall ratio of sizes that will make up each and every resource cluster that uses this file as its distribution file. We can see that in each cluster, the RelativeNumber or starting resources (those on your map when the game begins), there will be no dust motes (Asteroid0). There will be a percentage total of 16.7% 'Asteroid1' size, 33% 'Asteroid2', 33% 'Asteroid3' and 16.7% 'Asteroid4'. Or, we can say that for every 'Asteroid1' sized asteroid in this cluster you will find 2 'Asteroid2' sized asteroids, 2 'Asteroid3' sized asteroids and 1 'Asteroid4' sized asteroid.

Looking at the RegenNumber next, we see that 16.7% of the regenerated asteroids will be dust motes and so on. Eventually the entire cloud will be dust motes (because these cannot be harvested and once the are generated on your map, they are there to stay), but only after the cluster has been harvested three or four times.

So, to summarise; the RelativeNumber column is the percentage of the numResources attribute found in the ResourceSphere file. Making the RelativeNumber column add up to the numResources attribute makes the file easily readable. One can look at it and instantly know how many of each type of entity will occur. By making the RegenNumber column a percentage of the RelativeNumber again makes it easy to read because you can see how the cluster will regenerate.

Didn't I say that these were simple?

-------------------------------------------------------------

Tutorial Map Part Fifteen

We now know that the range of sizes of each resource type, and the range of regeneration are found in the distribution file that each resource line names. Lets give a slightly higher emphasis to the ratio of asteroids found in the Asteroid.dist file. Change the Asteroid.dist file lines to match;

Asteroid0		0	1
Asteroid1		2	3
Asteroid2		3	3
Asteroid3		3	2
Asteroid4		1	0

The point of this is to give the clusters our players start in more RU's. This will make these clusters highly desirable areas worth fighting for, bring the fight to each other as opposed to a central area drawing each player in, as most small maps tend to do. 

-------------------------------------------------------------

There are Four types of resources available; Asteroids, DustClouds, Nebula and GasCloud.

Resourcetype is:

For asteroids:		Asteroid0		(value-11RU's although these are non harvestable)
Asteroid1		(value-25RU's)
Asteroid2		(value-40RU's)
Asteroid3		(value-100RU's)
Asteroid4		(value-400RU's)

For dust clouds:		DustCloud0	(value-50RU's)
DustCloud1	(value-108RU's)
DustCloud2	(value-250RU's)
DustCloud3	(value-700RU's)

For Nebulae:		Nebula0		(value-100RU's)
Nebula1		(value-100RU's)
Nebula2		(value-100RU's)
Nebula3		(value-100RU's)
Nebula4		(value-100RU's)

For gas clouds:		GasCloud0	(value-0RU's and is Invisible)
GasCloud1	(value-0RU's and is Invisible)
GasCloud2	(value-0RU's and is Invisible)
GasCloud3	(value-0RU's and is Invisible)
GasCloud4	(value-0RU's and is Invisible)

Note: Gas Clouds are not supported and thus should not be used, they will crash your mission if used.

Note Also: The value of resourcetype depends on what type of resource it is. I have absolutely no idea why the nebula values are all the same All the values above, I found in the Homeworld.Big file using Taleisin's big file viewer/extractor.

[From Appendix I]

Just make sure that the correct resource types are present within each type of distribution file. The first parameter of the resource line is what you expect to find in the distribution file named also named in that line.

-------------------------------------------------------------
Tutorial Map Part Sixteen

We now know that the range of sizes of each resource type, and the range of regeneration are found in the distribution file that each resource line names. Lets give a slightly higher emphasis to the ratio of asteroids found in the Asteroid.dist file. Change the Asteroid.dist file lines to match;

Asteroid0		0	1
Asteroid1		2	3
Asteroid2		3	3
Asteroid3		3	2
Asteroid4		1	0

The point of this is to give the clusters our players start in more RU's. This will make these clusters highly desirable areas worth fighting for, bring the fight to each other as opposed to a central area drawing each player in, as most small maps tend to do. 

We are going to make each of our spheres as dense as possible. We are going to add a second sphere in exactly the same place as the last, but to retain (or even enhance) the spherical nature of these starting spheres we are going to reduce the size of both spheres, making one smaller than the other as well. Copy both resource lines in the ResourceSphere_1.missphere, paste them directly underneath. For each cluster we want a sphere with radius and diameter to 6000,12000 and the second as 8000,16000; 

Resources    Asteroid,0.0,50000.0,0.0,Sphere,Asteroid.dist,20,6000.4,12000.8,0.0,0.0,2048,1
Resources    Asteroid,0.0,50000.0,0.0,Sphere,Asteroid.dist,20,8000.4,16000.8, 0.0,0.0,2048,1
Resources    Asteroid,0.0,-50000.0,0.0,Sphere,Asteroid.dist,20,6000.4,12000.8,0.0,0.0,2048,1
Resources    Asteroid,0.0,-50000.0,0.0,Sphere,Asteroid.dist,20,8000.4,16000.8, 0.0,0.0,2048,1

Take a look at them in the game. Nice and dense, dense enough to hid our opponent in, but they don't look very spherical do they not? Well there is a property that can address this; the shell property and we could feasibly add a shell, which seem to retain their shape better for the larger spheres. But, were not going to do that, instead we are going to use a better method first devised by TAKER, we are going to use two cylinders at 45 angles to one another. These changes can be simply done by cutting and pasting, in fact 90% of making maps is cutting and pasting, I will take you through it;

Each player is going to start in an asteroid cluster composed of six lines of resources. Copy and paste each until you have 6 lines with co-ordinates '0,50000,0' and six of '0,-50000,0' (posx,posy,posz). Next rename the layout to 'Cylinder' for them all. The first two lines in each cluster we want to have numResources value of 16, radius and length of 6000 and 12000 respectively, the second line set the roty and rotz to 45. The next two lines again will have numResources of 16 but this time we want the cylinder to be slightly larger, set the radius and length to 8000 and 16000 respectively, the second 8000 radius line set the roty and rotz to 45. 

The last two lines of each cluster will be there purely for aesthetic reasons and will be composed entirely of dust motes, the distribution file for this is called Tiny.dist. If you open it up and take a look you will see it is composed of 15 asteroid0's only. For these lines, rename the distribution to 'Tiny.dist', change the numResources to 30, radius to 10000, length to 20000 and change the roty and rotz to 45 for the last line. Your lines should look like this when you're finished;

Resources    Asteroid,0.0,50000.0,0.0,Cylinder,Asteroid.dist,16,6000.4,12000.8,0.0,0.0,2048,1
Resources    Asteroid,0.0,50000.0,0.0,Cylinder,Asteroid.dist,16,6000.4,12000.8,45.0,45.0,2048,1
Resources    Asteroid,0.0,50000.0,0.0,Cylinder,Asteroid.dist,16,8000.4,16000.8,0.0,0.0,2048,1
Resources    Asteroid,0.0,50000.0,0.0,Cylinder,Asteroid.dist,16,8000.4,16000.8,45.0,45.0,2048,1
Resources    Asteroid,0.0,50000.0,0.0,Cylinder,Tiny.dist,30,10000.4,20000.8,0.0,0.0,?,?
Resources    Asteroid,0.0,50000.0,0.0,Cylinder,Tiny.dist,30,10000.4,20000.8,45.0,45.0,?,?
 
Resources    Asteroid,0.0,-50000.0,0.0,Cylinder,Asteroid.dist,16,6000.4,12000.8,0.0,0.0,2048,1
Resources    Asteroid,0.0,-50000.0,0.0,Cylinder,Asteroid.dist,16,6000.4,12000.8,45.0,45.0,2048,1
Resources    Asteroid,0.0,-50000.0,0.0,Cylinder,Asteroid.dist,16,8000.4,16000.8,0.0,0.0,2048,1
Resources    Asteroid,0.0,-50000.0,0.0,Cylinder,Asteroid.dist,16,8000.4,16000.8,45.0,45.0,2048,1
Resources    Asteroid,0.0,-50000.0,0.0,Cylinder,Tiny.dist,30,10000.4,20000.8,0.0,0.0,?,?
Resources    Asteroid,0.0,-50000.0,0.0,Cylinder,Tiny.dist,30,10000.4,20000.8,45.0,45.0,?,?

Take a look at the results in homeworld, a lot, lot better huh?

-------------------------------------------------------------

 

 
